// Function to add a user message to the chat window
export function addUserMessage(message) {
    const chatWindow = document.getElementById('chat-window');
    const messageContainer = document.createElement('div');
    messageContainer.className = 'message-container user-message-container';

    const userMessage = document.createElement('div');
    userMessage.className = 'user-message';
    userMessage.innerText = message;

    messageContainer.appendChild(userMessage);
    chatWindow.appendChild(messageContainer);

    chatWindow.scrollTop = chatWindow.scrollHeight;
}

// Function to add a bot message to the chat window
export function addBotMessage(message) {
    const chatWindow = document.getElementById('chat-window');
    const messageContainer = document.createElement('div');
    messageContainer.className = 'message-container bot-message-container';

    const botMessage = document.createElement('div');
    botMessage.className = 'bot-message';
    botMessage.innerText = message;

    messageContainer.appendChild(botMessage);
    chatWindow.appendChild(messageContainer);

    // Scroll to the bottom of the chat window
    chatWindow.scrollTop = chatWindow.scrollHeight;
}
